/*
 * silan_pwm_regs.h
 */

#ifndef __SILAN_PWM_REGISTERS_SPEC_H__
#define __SILAN_PWM_REGISTERS_SPEC_H__

#include "silan_types.h"
#include "ap1508.h"

#define SILAN_PWM_REGS_BASE   0x410D0000

#define  PWMPSC  __REG32(SILAN_PWM_REGS_BASE+0x00)
#define  PWM0D   __REG32(SILAN_PWM_REGS_BASE+0x04)
#define  PWM1D   __REG32(SILAN_PWM_REGS_BASE+0x08)
#define  PWM2D   __REG32(SILAN_PWM_REGS_BASE+0x0c)
#define  PWM3D   __REG32(SILAN_PWM_REGS_BASE+0x10)
#define  PWM4D   __REG32(SILAN_PWM_REGS_BASE+0x14)
#define  PWM5D   __REG32(SILAN_PWM_REGS_BASE+0x18)
#define  PWM6D   __REG32(SILAN_PWM_REGS_BASE+0x1c)
#define  PWM7D   __REG32(SILAN_PWM_REGS_BASE+0x20)


#define  PWM12   __REG32(SILAN_PWM_REGS_BASE+0x24)
#define  PWM34   __REG32(SILAN_PWM_REGS_BASE+0x28)
#define  PWM45   __REG32(SILAN_PWM_REGS_BASE+0x2c)
#define  PWM67   __REG32(SILAN_PWM_REGS_BASE+0x30)

#define  PWMCON  __REG32(SILAN_PWM_REGS_BASE+0x34)

#define PWMXEN(x)  ((x&0xff)<<4)
#define PWMREADSEL(x)  ((x&0xf))

#endif //__SILAN_PWM_REGISTERS_SPEC_H__
